<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head></head>
<body>
<div id="result">
<h5>Edit <?php echo $this->data['Paymentmethod']['methodname'];?> Configuration.</h5>
<form method="post" id="add_category" action="<?php echo Configure::read('base_url')."paymentmethods/edit";?>">
<table cellspacing="0" id="mytable">
          <tbody>
          <tr>
            <td colspan="2"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="144">
					<input type="hidden" name="data[id]" value="<?php echo $this->data['Paymentmethod']['id'];?>" />

<?php
//print_r($this->data);
echo $this->Form->input('email',array('label'=>'E-mail','size'=>30,'class'=>"required",'value'=>$this->data['Paymentmethod']['email'], 'title'=>"E-mail can not empty."));
echo $this->Form->input('apiuser',array('label'=>'Merchant ID','size'=>30,'class'=>"required",'value'=>$this->data['Paymentmethod']['apiuser'], 'title'=>"API User can not empty."));
echo $this->Form->input('apisigniture',array('label'=>'Merchant API Signiture','size'=>30,'class'=>"required",'value'=>$this->data['Paymentmethod']['apisigniture'], 'title'=>"API Signiture can not empty."));
echo $this->Form->input('apipass',array('label'=>'Merchant Password','size'=>30,'class'=>"required",'value'=>$this->data['Paymentmethod']['apipass'], 'title'=>"API Password can not empty."));
?>
<div class="input text"><label for="ChildGender">State</label>
		<?php
		$options=array('live'=>'live','demo'=>'demo');
		echo $this->Form->select('state',$options,array('selected'=>$this->data['Paymentmethod']['state']),array('empty'=>false));
		?>
</div>
    <?php
//echo $this->Form->input('apisigniture',array('label'=>'API Signature','size'=>30,'class'=>"required",'value'=>$this->data['Paymentmethod']['apisigniture'], 'title'=>"API Signature can not empty."));
//echo $form->label('IsActive');
//echo $this->Form->checkbox('status',array('value'=>true));
/*if($this->data['Paymentmethod']['status']==1){
echo $this->Form->checkbox('status', array('checked'=>'checked'));
}else{
echo $this->Form->checkbox('status');
}*/
/*echo $this->Form->input('apiuser');
		echo $this->Form->input('apipass');
		echo $this->Form->input('apisigniture');
		echo $this->Form->input('email');
		echo $this->Form->input('status');*/
?>
				</td>
                
              </tr>
               <tr> <td width="347"><input type="submit" style="background:#73AE0B; color:#fff; font-size:14px;" name="button" id="button" value="Submit" /></td>    </tr>
            </table></td>
            </tr>
        </tbody></table>
</form>
</div>
<?php  echo $html->script(array("jquery.min.js","jquery.form.js","jquery.validate.js")); ?>
 <script type="text/javascript">
 jQuery(document).ready(function(){
 jQuery("#category_table").tablesorter({headers: { 2:{sorter: false},3:{sorter: false}, 4:{sorter: false}, 5:{sorter: false}}});

// show a simple loading indicator
		var loader = jQuery('<div id="loader"><img src="<?php echo Configure::read('base_url');?>img/loading.gif" alt="loading..." /></div>')
			.css({position: "relative", top: "1em", left: "25em"})
			.appendTo("body")
			.hide();
		jQuery().ajaxStart(function() {
			loader.show();
		}).ajaxStop(function() {
			loader.hide();
		}).ajaxError(function(a, b, e) {
			throw e;
		});

		var v = jQuery("#add_category").validate({
			submitHandler: function(form) {
				jQuery(form).ajaxSubmit({
					target: "#result"
				});
			}
		});

	});
 </script>
</body>
</html>